﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using WmsApp.WmsService;

namespace WmsApp.Service
{
    public class PayApplyBillService : IEntityService<PayApplyBill, PayApplyBillService>
    {

        #region IEntityService<PayApplyBill> Members

        public List<PayApplyBill> GetEntityList()
        {
            var sc = Factory.WmsServiceFactory.GetServiceClient();
            List<PayApplyBill> list = sc.GetPayApplyBills();
            foreach (var payApplyBill in list)
            {
                payApplyBill.BindPropertyChanged();
            }
            return list;
        }

        public List<PayApplyBill> GetEntityList(string condition)
        {
            var sc = Factory.WmsServiceFactory.GetServiceClient();
            List<PayApplyBill> list = sc.GetPayApplyBillsByCondition(condition);
            foreach (var payApplyBill in list)
            {
                payApplyBill.BindPropertyChanged();
            }
            return list;
        }

        public void SaveEntityList(List<PayApplyBill> list)
        {
            throw new NotImplementedException();
        }

        public PayApplyBill GetEntity(string key)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
